#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

/**
 * Definition for singly-linked list.
 */
struct ListNode {
	int val;
	struct ListNode* next;
};
typedef struct ListNode listNode, *list_node;

int main()
{
	return 0;
}

struct ListNode* getIntersectionNode(struct ListNode* headA, struct ListNode* headB)
{
	list_node p_a = headA, p_b = headB;
	while (p_a || p_b) {
		if (p_a == p_b) return p_a;
		p_a = p_a == 0 ? headB : p_a->next;
		p_b = p_b == 0 ? headA : p_b->next;
	}
	return NULL;
}
